package com.itrus.serviceframe;

import java.io.IOException;
import java.util.Enumeration;
import java.util.Vector;

public class NVRepository
{
  private Vector m_anvp = new Vector();
  private int version = 0;

  public NVRepository(int paramInt)
  {
    this.version = paramInt;
  }

  public void add(NameValuePair paramNameValuePair)
  {
    this.m_anvp.addElement(paramNameValuePair);
  }

  public NameValuePair elementAt(int paramInt)
  {
    return (NameValuePair)this.m_anvp.elementAt(paramInt);
  }

  public Enumeration elements()
  {
    return this.m_anvp.elements();
  }

  public NVRepository find(String paramString)
  {
    NVRepository localNVRepository = new NVRepository(this.version);
    int i = 0;
    int j = size();
    while (true)
    {
      if (i >= j)
        return localNVRepository;
      NameValuePair localNameValuePair = elementAt(i);
      if (paramString.compareToIgnoreCase(localNameValuePair.getName()) == 0)
        localNVRepository.add(localNameValuePair);
      i++;
    }
  }

  int getSize()
    throws IOException
  {
    int i = 0;
    int j = 0;
    int k = size();
    while (true)
    {
      if (j >= k)
      {
        if (i <= 2147483647)
          break;
        throw new IllegalStateException();
      }
      NameValuePair localNameValuePair = elementAt(j);
      localNameValuePair.setVersion(this.version);
      i += localNameValuePair.getSize();
      j++;
    }
    return i;
  }

  public int getVersion()
  {
    return this.version;
  }

  public void remove(int paramInt)
  {
    this.m_anvp.removeElementAt(paramInt);
  }

  public void remove(NameValuePair paramNameValuePair)
  {
    this.m_anvp.removeElement(paramNameValuePair);
  }

  public void replace(NameValuePair paramNameValuePair)
  {
    String str = paramNameValuePair.getName();
    int i = 0;
    int j = size();
    while (true)
    {
      if (i >= j);
      while (true)
      {
        add(paramNameValuePair);
        return;
        if (str.compareToIgnoreCase(elementAt(i).getName()) != 0)
          break;
        remove(i);
      }
      i++;
    }
  }

  public void setVersion(int paramInt)
  {
    this.version = paramInt;
  }

  public int size()
  {
    return this.m_anvp.size();
  }
}

/* Location:           C:\Users\user\Desktop\dd28_pcdd720\classes_dex2jar.jar
 * Qualified Name:     com.itrus.serviceframe.NVRepository
 * JD-Core Version:    0.6.2
 */